<?php

/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class ForgetPassword extends CFormModel {

    public $email;
    public $answer;
    public $verifyCode;
    /**
     * Declares the validation rules.
     * The rules state that email and password are required,
     * and password needs to be authenticated.
     */
    public function rules() {
        return array(
            
            array('email', 'required'),
            array('email','exist','className'=>'Users','attributeName'=>'email'),
            array('email', 'email'),
            array('verifyCode', 'captcha', 'allowEmpty' => !CCaptcha::checkRequirements()),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels() {
        return array(
            'email'=>'Email',
            'answer'=>'Security question',
            'verifyCode'=>'Verify code',
        );
    }
    
    public function check(){
        
    }

    

}
